<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>30图片模糊处理filter和calc函数</title>
    <style>
        .pic {
            filter: blur(3px);
        }
        
        .pic:hover {
            filter: blur(0);
        }
        
        .box {
            width: 100px;
            height: 50px;
            background: pink;
        }
        /* 子元素宽度是父元素宽度减去20px */
        
        .box .son {
            width: calc(100% - 20px);
            height: 20px;
            background: skyblue;
        }
        
        .box:hover {
            width: 200px;
        }
    </style>
</head>

<body>
    <div>
        <a href="https://www.bilibili.com/video/BV14J4114768?p=289&spm_id_from=pageDriver" class="mask" target="_blank" title="点击跳转">
            <img src="./study/images/box-bd2.png" alt="" class="pic">
        </a>
    </div>
    <h3>子元素的宽度会一直比父元素的少20px，即使父元素宽度增加</h3>
    <div class="box">
        <div class="son"></div>
    </div>
</body>

</html>